package tech.aistar.mapper.userVerifiedMapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tech.aistar.entity.authordis.UserTable;
import tech.aistar.entity.daoyou.UserIdcard;

/**
 * Created by lenovo on 2019/10/16.
 */
public interface userVerifiedMapper {
    //从用户表里根据phone查id看是否为用户
    @Select("select id from user_table where phone=${values}")
    UserTable findByPhone(String phone);


    @Select("select * from user_table where idcard=#{value}")
    UserTable findUser(String idcard);

    @Insert("insert into user_table(birthday,idcard) values (#{birthday},#{idcard}) where id=#{userid})")
    void saveUser(@Param("birthday")String birth,@Param("idcard")String idcard,@Param("userid")Integer userid);

}
